from django.shortcuts import render
from app01.models import Merch


# Create your views here.


def merch_read(request, id):
    coo = request.session.get('info', "")
    if request.method == 'GET':
        read_merch = Merch.objects.filter(id=id).first()
        return render(request, "merch/merch.html", {"read_merch": read_merch, "coo": coo})


def merch_show(request, type):
    coo = request.session.get('info', "")
    if request.method == 'GET':
        show_merch = Merch.objects.all()
        return render(request, "merch/merch_show.html", {"show_merch": show_merch, "coo": coo})